package logger

import (
	"DCOS-API/utils"
	"github.com/sirupsen/logrus"
)

type Logger struct {
	Api string `json:"api"`
	Uid string `json:"uid"`
	IP string `json:"ip"`
}

func (l *Logger) WarnLevel(msg string)  {
	level := logrus.WarnLevel
	logrus.AddHook(newLfsHook(level,30))
	logrus.SetLevel(level)
	lmp, _ := utils.St2Js2Mp(l)
	logrus.WithFields(lmp).Warn(msg)
}
